<include file="Public:header" />
<include file="Public:left" />
<style>
    td{text-align:center;}
</style>
<section>
    <div class="page_title">
        <h2 class="fl">会员等级列表</h2>
        <a class="fr" href="{:url('User/add_authority')}">添加会员等级</a>
    </div>
    <table class="table">
        <tr>
            <th style="width: 50px;">ID</th>
            <th>等级名称</th>
            <th>企业查询</th>
            <th>公式公告</th>
            <th>通知公告</th>
            <th>政策文件</th>
            <th>企业关注数</th>
            <th>微信推文</th>
            <th>政策解读</th>
            <th>申报跟踪通知</th>
            <th>规划报告</th>
            <th>顾问</th>
            <th>信息维护</th>
            <th>价格</th>
            <th>期限</th>
            <th style="width:150px;">操作</th>
        </tr>
        <volist name="list" id="vo">
           <tr>
            <td><div class="cut_title ellipsis">{$vo.id}</div></td>
            <td><div class="cut_title ellipsis">{$vo.name}</div></td>
            <td>
                是否项目查询：<if condition="$vo['project'] eq -1">>否<else />是</br>显示条数：<if condition="$vo['project'] eq -2">无限<else />{$vo['project']}</if></if>
            </td>
            <td>
                条件限制：<if condition="$vo['formula']['formula_condition'] eq 0">无限<else />有限</if></br>
                <if condition="$vo['formula']['formula_condition'] eq 1">
                是否查阅：<if condition="$vo['formula']['formula_consult'] eq -1">不可查阅<else />可查阅</br>可查阅条数：<if condition="$vo['formula']['formula_consult_num'] eq -2">无限制<else />{$vo['formula']['formula_consult_num']}</if></if></br>
                公告附件：<if condition="$vo['formula']['formula_enclosure'] eq -1">不可查阅<else />可查阅</br>公告附件查阅次数:<if condition="$vo['formula']['formula_enclosure_num'] eq -2">无限制<else />{$vo['formula']['formula_enclosure_num']}</if></if>

                </br>公告附件下载：<if condition="$vo['formula']['formula_down'] eq -1">不可下载<else />可下载</br>公告附件下载次数：<if condition="$vo['formula']['formula_down_num'] eq -2">无限制<else />{$vo['formula']['formula_down_num']}</if></if></br>
                </if>
            </td>
            <td>
                条件限制：<if condition="$vo['circular']['circular_condition'] eq 0">无限<else />有限</if></br>
                <if condition="$vo['circular']['circular_condition'] eq 1">
                是否查阅：<if condition="$vo['circular']['circular_consult'] eq -1">不可查阅<else />可查阅</br>可查阅条数：<if condition="$vo['circular']['circular_consult_num'] eq -2">无限制<else />{$vo['circular']['circular_consult_num']}</if></if></br>
                公告附件：<if condition="$vo['circular']['circular_enclosure'] eq -1">不可查阅<else />可查阅</br>公告附件查阅次数:<if condition="$vo['circular']['circular_enclosure_num'] eq -2">无限制<else />{$vo['circular']['circular_enclosure_num']}</if></if>

                </br>公告附件下载：<if condition="$vo['circular']['circular_down'] eq -1">不可下载<else />可下载</br>公告附件下载次数：<if condition="$vo['circular']['circular_down_num'] eq -2">无限制<else />{$vo['circular']['circular_down_num']}</if></if></br>
                </if>
            </td>
            <td>
                条件限制：<if condition="$vo['policy']['policy_condition'] eq 0">无限<else />有限</if></br>
                <if condition="$vo['policy']['policy_condition'] eq 1">
                是否查阅：<if condition="$vo['policy']['policy_consult'] eq -1">不可查阅<else />可查阅</br>可查阅条数：<if condition="$vo['policy']['policy_consult_num'] eq -2">无限制<else />{$vo['policy']['policy_consult_num']}</if></if></br>
                公告附件：<if condition="$vo['policy']['policy_enclosure'] eq -1">不可查阅<else />可查阅</br>公告附件查阅次数:<if condition="$vo['policy']['policy_enclosure_num'] eq -2">无限制<else />{$vo['policy']['policy_enclosure_num']}</if></if>

                </br>公告附件下载：<if condition="$vo['policy']['policy_down'] eq -1">不可下载<else />可下载</br>公告附件下载次数：<if condition="$vo['policy']['policy_down_num'] eq -2">无限制<else />{$vo['policy']['policy_down_num']}</if></if></br>
                </if>
            </td>
            <td>
                <if condition="$vo['enterprise_follow_num'] eq '-1'">
                    没关注权限
                    <else />
                    <if condition="$vo['enterprise_follow_num'] eq '-2'">
                        无限制
                        <else />
                        {$vo['enterprise_follow_num']}
                    </if>
                </if>
            </td>
            <td>
                <if condition="$vo['wechat_tweets_num'] eq '-1'">
                    没微信推文
                    <else />
                    <if condition="$vo['wechat_tweets_num'] eq '-2'">
                        无限制
                        <else />
                        {$vo['wechat_tweets_num']}
                    </if>
                </if>
            </td>
            <td>
                <if condition="$vo['policy_interpretation_num'] eq '-1'">
                    没政策解读
                    <else />
                    <if condition="$vo['policy_interpretation_num'] eq '-2'">
                        无限制
                        <else />
                        {$vo['policy_interpretation_num']}
                    </if>
                </if>
            </td>
            <td>
                <if condition="$vo['tracking_bulletin_num'] eq '-1'">
                    没跟踪通知
                    <else />
                    <if condition="$vo['tracking_bulletin_num'] eq '-2'">
                        无限制
                        <else />
                        {$vo['tracking_bulletin_num']}
                    </if>
                </if>
            </td>
            <td>
                <if condition="$vo['enterprise_planning_num'] eq '-1'">
                    没有企业规划
                    <else />
                    <if condition="$vo['enterprise_planning_num'] eq '-2'">
                        无限制
                        <else />
                        {$vo['enterprise_planning_num']}
                    </if>
                </if>
            </td>
            <td>
                <if condition="$vo['business_doctor'] eq '0'">
                    没有
                    <else />
                    有
                </if>
            </td>
            <td>
                <if condition="$vo['information_maintenance'] eq '0'">
                    没有
                    <else />
                    有
                </if>
            </td>
            <td>
                <if condition="$vo['price'] eq '0'">
                    免费
                    <else />
                    {$vo['price']/100}元
                </if>
            </td>
            <td>
                <if condition="$vo['term'] eq '0'">
                    无限
                    <else />
                    {$vo['term']}月
                </if>
            </td>
            <td>
                <a href="javascript:void(0)" id="{$vo['id']}"  class="inner_btn dynamic_del" >删除</a>
                <a href="{:url('User/edit_authority',array('id'=>$vo['id']))}" id="{$vo['id']}"  class="inner_btn dynamic_edit" >编辑</a>
            </td>
           </tr>
       </volist>
    </table>
    {$page}
</section>
 </div>
</section>
<script>
    $(".dynamic_del").click(function(){
        var id = $(this).attr('id');
        if(confirm('是否确定下架删除该会员等级')){
            $.post("{:url('user/authority_del')}",{id:id},function(result){
                if(result.code == '0'){
                    layer.alert(result.msg);
                }else{
                    layer.alert(result.msg, {   
                        btn: ['确定']  
                    },  
                        function (index, item) { 
                        location.href = result.url;
                    });  
                }
            });
        }
    });
    
</script>
</body>
</html>
